package org.jeecg.modules.wms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

/**
 * 成品入库明细表
 */
@Data
@TableName("wms_finished_goods_inbound_detail")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "FinishedGoodsInboundDetail", description = "成品入库明细")
public class FinishedGoodsInboundDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键ID")
    private String id;

    /**
     * 入库单ID
     */
    @Excel(name = "入库单ID", width = 15)
    @ApiModelProperty(value = "入库单ID")
    private String inboundId;

    /**
     * 订单明细ID
     */
    @Excel(name = "订单明细ID", width = 15)
    @ApiModelProperty(value = "订单明细ID")
    private String orderDetailId;

    /**
     * 门窗系列
     */
    @Excel(name = "门窗系列", width = 15)
    @ApiModelProperty(value = "门窗系列")
    private String windowSeries;

    /**
     * 门窗窗号
     */
    @Excel(name = "门窗窗号", width = 15)
    @ApiModelProperty(value = "门窗窗号")
    private String windowNo;

    /**
     * 门窗颜色
     */
    @Excel(name = "门窗颜色", width = 15)
    @ApiModelProperty(value = "门窗颜色")
    private String windowColor;

    /**
     * 计划入库数量
     */
    @Excel(name = "计划入库数量", width = 15)
    @ApiModelProperty(value = "计划入库数量")
    private Integer plannedQuantity;

    /**
     * 实际入库数量
     */
    @Excel(name = "实际入库数量", width = 15)
    @ApiModelProperty(value = "实际入库数量")
    private Integer actualQuantity;

    /**
     * 库位ID
     */
    @Excel(name = "库位ID", width = 15)
    @ApiModelProperty(value = "库位ID")
    private String locationId;

    /**
     * 入库批次号
     */
    @Excel(name = "入库批次号", width = 15)
    @ApiModelProperty(value = "入库批次号")
    private String batchNo;

    /**
     * 生产批次号
     */
    @Excel(name = "生产批次号", width = 15)
    @ApiModelProperty(value = "生产批次号")
    private String productionBatchNo;

    /**
     * 质检状态：0-待检，1-合格，2-不合格
     */
    @Excel(name = "质检状态", width = 15, dicCode = "finished_goods_quality_status")
    @Dict(dicCode = "finished_goods_quality_status")
    @ApiModelProperty(value = "质检状态：0-待检，1-合格，2-不合格")
    private Integer qualityStatus;

    /**
     * 质检员
     */
    @Excel(name = "质检员", width = 15)
    @ApiModelProperty(value = "质检员")
    private String qualityInspector;

    /**
     * 质检日期
     */
    @Excel(name = "质检日期", width = 15, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "质检日期")
    private Date qualityDate;

    /**
     * 备注
     */
    @Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 租户ID
     */
    @ApiModelProperty(value = "租户ID")
    private Integer tenantId;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    // 扩展字段，用于前端展示
    /**
     * 库位名称
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "库位名称")
    private String locationName;

    /**
     * 仓库ID
     */
    @Excel(name = "仓库ID", width = 15)
    @ApiModelProperty(value = "仓库ID")
    private String warehouseId;

    /**
     * 仓库名称
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "仓库名称")
    private String warehouseName;
}
